package com.anXin.model.common.enums;

public enum AppHttpCodeEnum {

    // 成功段0
    SUCCESS(200,"操作成功"),
    // 登录段1~50
    NEED_LOGIN(1,"需要登录后操作"),
    LOGIN_PASSWORD_ERROR(2,"密码错误"),

    LOGIN_CODE_ERROR(3,"验证码错误"),
    LOGIN_PHONE_ERROR(4,"手机号格式错误"),
    LOGIN_PHONECODE_ERROR(4,"手机验证码发送失败"),
    LOGIN_PHONEREG_ERROR(5,"该手机号已被注册！"),
    LOGIN_PASSWORDINVALID_ERROR(6,"密码格式错误！必须为4~32位的字母、数字、下划线"),
    LOGIN_PHONECODEINVALID_ERROR(7,"手机验证码错误"),
    LOGIN_PHONENULL_ERROR(8,"该手机未注册"),
    LOGIN_PHONECODENULL_ERROR(9,"手机验证码失效"),
    LOGIN_PASSWORD_AGAIN_ERROR(10,"两次密码不一致"),
    // TOKEN50~100
    TOKEN_INVALID(50,"无效的TOKEN"),
    TOKEN_EXPIRE(51,"TOKEN已过期"),
    TOKEN_REQUIRE(52,"TOKEN是必须的"),
    // SIGN验签 100~120
    SIGN_INVALID(100,"无效的SIGN"),
    SIG_TIMEOUT(101,"SIGN已过期"),
    // 参数错误 500~1000
    PARAM_REQUIRE(500,"缺少参数"),
    PARAM_INVALID(501,"无效参数"),
    PARAM_IMAGE_FORMAT_ERROR(502,"图片格式有误"),
    SERVER_ERROR(503,"服务器内部错误"),
    OPERATE_BUSY_ERROR(504,"操作失败,系统繁忙,请稍后重试"),
    // 数据错误 1000~2000
    DATA_EXIST(1000,"数据已经存在"),
    USER_DATA_NOT_EXIST(1001,"User数据不存在"),

    DATA_NOT_EXIST(1002,"数据不存在"),
    DATA_LIST_NULL(1003,"搜索结果为空"),
    USER_OLDMAN_DATA_EXIST(1004,"未绑定老人"),
    ADDR_LIST_NULL(1005,"未添加地址"),
    REPORT_LIST_NULL(1006,"请先生成健康报告"),
    USER_EQUIMENT_EXIST(1007,"该设备已被绑定"),
    // 数据错误 3000~3500
    NO_OPERATOR_AUTH(3000,"无权限操作"),
    NEED_ADMIND(3001,"需要管理员权限"),
    USER_UPDATE_ERROR(3002,"用户信息修改失败"),

    MATERIASL_REFERENCE_FAIL(3501,"素材引用失效");




    int code;
    String errorMessage;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
